<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Jstl forEach tag demo</title>
</head>
<body>
	<h3>Map&lt;String, List&gt;的遍历</h3>
	<c:forEach var="e" items="${entry}">
		<h3>
			For <c:out value="${e.key}" />
		</h3>
		<table>
			<thead>
				<tr>
					<th>Machine Name</th>
					<th>T2_95</th>
					<th>T2_99</th>
					<th>Syncs</th>
					<th>Syncs Behind</th>
					<th>Average</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="m" items="${e.value}">
					<tr>
						<td>${m.machineName}</td>
						<td>${m.t2_95}</td>
						<td>${m.t2_99}</td>
						<td>${m.syncs}</td>
						<td>${m.syncsBehind}</td>
						<td>${m.average}</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</c:forEach>

	<h3>List&lt;Map&lt;String, List&gt;&gt;的遍历1</h3>
	<p>可以指定表格每一列的顺序</p>
	<table>
		<thead>
			<tr>
				<th>id</th>
				<th>name</th>
				<th>age</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="m" items="${list}">
				<tr>
					<td>${m["id"]}</td>
					<td>${m["name"]}</td>
					<td>${m["age"]}</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	
	<h3>List&lt;Map&lt;String, List&gt;&gt;的遍历2</h3>
	<p>输出顺序不可以预测，要看Map的实现方式</p>
	<table>
		<tbody>
			<c:forEach var="m" items="${list}">
				<tr>
					<c:forEach var="i" items="${m}">
					<th>${i.key}</th>
					<td>${i.value}</td>
					</c:forEach>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	
	<h3>List&lt;Map&lt;String, List&gt;&gt;的遍历3</h3>
	<p>可以指定表格每一列的顺序</p>
	<table>
		<thead>
			<tr>
				<th>id</th>
				<th>name</th>
				<th>age</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="m" items="${list}">
				<tr>
					<td>${m.id}</td>
					<td>${m.name}</td>
					<td>${m.age}</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	
</body>
</html>